package com.project.service;

import com.project.entity.Expert;
import com.project.entity.Question;
import com.project.mapper.ExpertMapper;
import com.project.mapper.QuestionMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ExpertService {
    @Autowired
    private ExpertMapper expertMapper;

    public List<Expert> findPage(Integer pageIndex, Integer pageCount) {
        int startIndex = (pageIndex - 1) * pageCount;


        return expertMapper.findPage(startIndex, pageCount);
    }

    public int findAllNum() {
        return expertMapper.findAllNum();
    }
}
